package controllers

import (
	"context"

	"gitee.com/yangwencheng/vblog/mvc/daos"
	"gitee.com/yangwencheng/vblog/mvc/models"
)

var blogService *daos.BlogService

func init() {
	blogService = daos.NewBlogService()
}

func NewBlogController() *BlogController {
	return &BlogController{}
}

type BlogController struct {
}

func (blogController *BlogController) CreateBlog(ctx context.Context, blog *models.Blog) error {
	// 验证基本数据
	blogService.CreateBlog(blog)
	return nil
}
